package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import java.io.File;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VistaMenu extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JButton btnGenerarPartidos;
	private JLabel lblFondo;
	private JLabel lblMenu;
	private JButton btnPosiciones;
	private JButton btnCalendario;
	private JButton btnCargarArbitro;
	private JButton btnCargarEquipo;
	private ImageIcon imgFondo;

	/**
	* Auto-generated main method to display this JFrame
	*/

	public VistaMenu() {
		super();
		ImageIcon imgFondo = new ImageIcon(getClass().getResource("imagen" + File.separatorChar + "Beisbol5.jpg"));
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.NORTH);
				jPanel1.setPreferredSize(new java.awt.Dimension(450, 205));
				jPanel1.setLayout(null);
				{
					btnCargarEquipo = new JButton();
					jPanel1.add(btnCargarEquipo);
					btnCargarEquipo.setText("Cargar Equipos");
					btnCargarEquipo.setBounds(12, 112, 127, 22);
				}
				{
					btnCargarArbitro = new JButton();
					jPanel1.add(btnCargarArbitro);
					btnCargarArbitro.setText("Cargar Arbitro");
					btnCargarArbitro.setBounds(12, 168, 127, 22);
				}
				{
					btnGenerarPartidos = new JButton();
					jPanel1.add(btnGenerarPartidos);
					btnGenerarPartidos.setText("Generar Partidos");
					btnGenerarPartidos.setBounds(254, 84, 156, 22);
				}
				{
					btnCalendario = new JButton();
					jPanel1.add(btnCalendario);
					btnCalendario.setText("Calendario de Juegos");
					btnCalendario.setBounds(254, 134, 156, 22);
				}
				{
					btnPosiciones = new JButton();
					jPanel1.add(btnPosiciones);
					btnPosiciones.setText("Tabla de Posiciones");
					btnPosiciones.setBounds(254, 183, 156, 22);
				}
				{
					lblMenu = new JLabel();
					jPanel1.add(lblMenu);
					lblMenu.setText("MENU PRINCIPAL");
					lblMenu.setBounds(154, 20, 116, 24);
				}
			}
			{
				lblFondo = new JLabel(imgFondo);
				jPanel1.add(lblFondo);
				lblFondo.setBounds(478, 25, 104, 87);
			}
			pack();
			this.setSize(626, 425);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
		public void agregarListener(ActionListener accion){
			
			btnCargarEquipo.addActionListener(accion);
			btnCargarArbitro.addActionListener(accion);
			btnGenerarPartidos.addActionListener(accion);
			btnCalendario.addActionListener(accion);
			btnPosiciones.addActionListener(accion);
			
			
		}

}
